#include<iostream>
using namespace std;
void main()
{	
	double input, sum, count, average;
	input=-1;
	sum=0;
	count=-1;
	average=0;
	while (input!=0)
	{	
		cout<<"please enter a number"<<endl;
		cin>>input;
		sum=sum+input;
		count++;
	}

	
	average=sum/count;
	cout<<"The average is " << average << endl;

	system("pause");
}